﻿@{
    Layout = null;
}
@*@model System.Data.DataTable*@
@model System.Collections.IEnumerable
<!DOCTYPE html>
<html>
<head>
    <title>税款调整查询</title>
        @if (false)
        {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
        }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/json2.js", true)" type="text/javascript"></script>
@Html.DevExpress().GetStyleSheets(
                new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme },
                new StyleSheet { ExtensionType = ExtensionType.DropDownEdit, Theme = DevExpressHelper.Theme },
                new StyleSheet { ExtensionType = ExtensionType.ComboBox, Theme = DevExpressHelper.Theme }
)
  
  <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/checkinput.js")" type="text/javascript"></script>
    <style type="text/css">
        #form_query
        {
        }

        input,select
        {
            border: 1px solid #aecaf0;
        }
        input.txt,select.txt
        {
            width: 99%;
        }
        input.btn
        {
            padding: 3px 10px 2px;
            border: #a3c0e8 1px solid;
            background: #e2f0ff url(/EnterpriseFund/DXR.axd?r=0_54) repeat-x 50% top;
            color: #2c4d79;
            cursor: pointer;
        }
        input.btn:hover
        {
            background-image: url(/EnterpriseFund/DXR.axd?r=0_57);
        }
        th
        {
            text-align: right;
        }
    </style>
    
    <script type="text/javascript">
        var rootUrl = '@Url.Content("~/QuerySpecificAdjust/")';


        function OnBeginCallback(s, e) {
            e.customArgs["command"] = e.command;


            var fTaxClassAllowanceName = $("#hfTaxClassAllowanceName").val();

            var fEmpName = $("#hfEmpName").val();
            var nsrsbh = $("#hnsrsbh").val();
            var nsrbm = $("#hnsrbm").val();
            var nsrmc = $("#hnsrmc").val();
            var rKRQBeginDate = $("#hrKRQBeginDate").val();
            var rKRQEndDate = $("#hrKRQEndDate").val();
            var ssRQBeginDate = $("#hssRQBeginDate").val();
            var ssRQEndDate = $("#hssRQEndDate").val();


            e.customArgs["FTaxClassAllowanceName"] = fTaxClassAllowanceName;
            e.customArgs["FEmpName"] = fEmpName;
            e.customArgs["nsrsbh"] = nsrsbh;
            e.customArgs["nsrbm"] = nsrbm;
            e.customArgs["nsrmc"] = nsrmc;
            e.customArgs["RKRQBeginDate"] = rKRQBeginDate;
            e.customArgs["RKRQEndDate"] = rKRQEndDate;
            e.customArgs["SSRQBeginDate"] = ssRQBeginDate;
            e.customArgs["SSRQEndDate"] = ssRQEndDate;
        }


        //查询
        function search() {
            //              var fspecialAdjustName = FSpecialAdjustName.GetValue();
            //               var rKRQBeginDate = RKRQBeginDate.GetValue();
            //                var rKRQEndDate = RKRQEndDate.GetValue();
            // if (CheckValues())
            $("#hfTaxClassAllowanceName").val(FTaxClassAllowanceName.GetValue());
            $("#hfEmpName").val(FEmpName.GetValue());
            $("#hnsrsbh").val(Nsrsbh.GetText());
            $("#hnsrbm").val(Nsrbm.GetText());
            $("#hnsrmc").val(Nsrmc.GetText());
            if (RKRQBeginDate.GetDate() != null) {
                $("#hrKRQBeginDate").val(RKRQBeginDate.GetText());
            }
            else {
                $("#hrKRQBeginDate").val("");
            }
            if (RKRQEndDate.GetDate() != null) {
                $("#hrKRQEndDate").val(RKRQEndDate.GetText());
            }
            else {

                $("#hrKRQEndDate").val("");
            }
//           
                $("#hssRQBeginDate").val(SSRQBeginDate.GetText());
//           
                $("#hssRQEndDate").val(sSRQEndDate.GetText());
//           



                $("#hsearched").val("T");
            gvEditing.Refresh();

        }


        //重置
        function undo() {
            FTaxClassAllowanceName.SetText("");
            FEmpName.SetText("");
            Nsrsbh.SetText("");
            Nsrbm.SetText("");
            Nsrmc.SetText("");
            RKRQBeginDate.SetText("");
            RKRQEndDate.SetText("");
            SSRQBeginDate.SetText("");
            sSRQEndDate.SetText("");
        }

        function MenuTop_emClick(source, e) {
            switch (e.item.name) {
                case "btnExcel":
                    {
                        if ($("#hsearched").val() == "T") {
                            //if (CheckValues())
                            form_query.target = '_self';
                            form_query.action = rootPath + "/QueryTaxAuditAdjust/ExportToXls";
                            form_query.submit();
                        }
                        break;


                    }
                case "btnReport":
                    {
                        if ($("#hsearched").val() == "T") {
                            window.showModalDialog(rootPath + "/QueryTaxAuditAdjust/Print", window, "dialogWidth=800px;dialogHeight=500px");
                        }
                        //if (CheckValues())
                        //                        form_query.target = '_blank';
                        //                        //  form_query.target = 'parent.contentframe';
                        //                        //  parent.contentframe.url(
                        //                        form_query.action = rootPath + "/QueryTaxAuditAdjust/Print";
                        //                        form_query.submit();
                        //                        break;


                    }

                case "btnGridShow":
                    {
                        gvEditing.ShowCustomizationWindow();
                        break;
                    }
            }
        }
        function keyPress() {
            if (event.keyCode && event.keyCode == 13) {
                search();

            }

        }
    </script>
</head>
<body  onkeypress="keyPress()">
    @Html.Partial("LoadPanelPartial")
    @Html.DevExpress().Menu(settings =>
{
    settings.Name = "toolBarMenu";
    settings.ItemAutoWidth = false;
    settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
    settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
    settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
    settings.Items.Add(item =>
    {
        item.Name = "btnExcel";
        item.Text = "导出Excel";
        item.Image.Url = Url.Content("~/Content/ControlImages/excel.png");
    });
    settings.Items.Add(item =>
    {
        item.Name = "btnReport";
        item.Text = "打印";
        item.Image.Url = Url.Content("~/Content/icons/print.png");
    });

    settings.Items.Add(item =>
    {
        item.Name = "btnGridShow";
        item.Text = "选择列";
        item.Image.Url = Url.Content("~/Content/FunctionImages/AllowanceFileAudit.png");
    });


    settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
    settings.ItemLinkMode = ItemLinkMode.ContentBounds;
}).GetHtml()
    @using (Html.BeginForm("ExportToXls", "QueryTaxAuditAdjust", FormMethod.Post, new { id = "form_query" }))
    {

   @* <form name="form_query" id="form_query" method="post" class="form_query" action="@Url.Content("~/QuerySpecificAdjust/index")">*@
    <table class="query" width="800px" style="margin-left: auto; margin-right: auto">
        <tr>
            <td align="right" style="text-align:right">
                纳税人识别号：
            </td>
            <td>
                                                    @Html.DevExpress().TextBox(settings =>
                                               {
                                                   settings.Name = "Nsrsbh";
                                                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
                                               }).GetHtml()
            </td>
            <td align="right" style="text-align:right">
                纳税人编码：
            </td>
            <td>
                                                    @Html.DevExpress().TextBox(settings =>
                                               {
                                                   settings.Name = "Nsrbm";
                                                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
                                               }).GetHtml()
            </td>
            <td align="right" style="text-align:right">
                调整日期：
            </td>
            <td>
                <table>
                    <tr>
                        <td>
                            @Html.DevExpress().DateEdit(settings =>
                       {
                           settings.Name = "RKRQBeginDate";
                           settings.Width = System.Web.UI.WebControls.Unit.Pixel(90);
                           settings.Properties.ShowShadow = true;
                           settings.Properties.EditFormat = EditFormat.Date;
                           settings.Properties.EditFormatString = "yyyy-MM-dd";
                           settings.Properties.MinDate = DateTime.Parse("1900-01-01");
                           settings.Properties.UseMaskBehavior = true;
                       }).Bind(ViewBag.RKRQBeginDate).GetHtml()
                        </td>
                        <td>
                            -
                        </td>
                        <td>
                            @Html.DevExpress().DateEdit(settings =>
                       {
                           settings.Name = "RKRQEndDate";
                           settings.Width = System.Web.UI.WebControls.Unit.Pixel(90);
                           settings.Properties.ShowShadow = true;
                           settings.Properties.EditFormat = EditFormat.Date;
                           settings.Properties.EditFormatString = "yyyy-MM-dd";
                           settings.Properties.MinDate = DateTime.Parse("1900-01-01");
                           settings.Properties.UseMaskBehavior = true;
                       }).Bind(ViewBag.RKRQEndDate).GetHtml()
                        </td>
                    </tr>
                </table>
            </td>
            <td>
                @Html.DevExpress().Button(settings =>
           {
               settings.Name = "btnSearch";
               settings.Text = "查询";
               settings.ControlStyle.CssClass = "button";
               settings.Images.Image.Url = Url.Content("~/Content/ControlImages/search.png");
               settings.ClientSideEvents.Click = "search";
           }).GetHtml()
            </td>
            <td>
                @Html.DevExpress().Button(settings =>
           {
               settings.Name = "btnUndo";
               settings.Text = "重置";
               settings.ControlStyle.CssClass = "button";
               settings.Images.Image.Url = Url.Content("~/Content/ControlImages/undo_blue.png");
               settings.ClientSideEvents.Click = "undo";
           }).GetHtml()
            </td>
        </tr>
        <tr>
            <td align="right" style="text-align:right">
                纳税人名称：
            </td>
            <td >
                                                    @Html.DevExpress().TextBox(settings =>
                                               {
                                                   settings.Name = "Nsrmc";
                                                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
                                               }).GetHtml()
            </td>
            <td align="right" style="text-align:right">
               征收项目：
            </td>
            <td>
                                   @Html.DevExpress().ComboBox(settings =>
                              {
                                  settings.Name = "FTaxClassAllowanceName";
                                  settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                                  settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
                                  settings.Properties.TextField = "FTaxClassAllowanceName";
                                  settings.Properties.ValueField = "FTaxClassAllowanceNo";
                              }).BindList(ViewBag.FTaxClassAllowanceNames).Bind(ViewBag.FTaxClassAllowanceName).GetHtml()

            </td>
            <td align="right" style="text-align:right">
                调整金额：
            </td>
            <td>
                <table>
                    <tr>
                        <td>
                                                            @Html.DevExpress().TextBox(settings =>
                                                       {
                                                           settings.Name = "SSRQBeginDate";
                                                           settings.Width = System.Web.UI.WebControls.Unit.Pixel(90);
                                                       }).GetHtml()
                            
                        </td>
                        <td align="center">
                            -
                        </td>
                        <td>
                                                                                    @Html.DevExpress().TextBox(settings =>
                                                                               {
                                                                                   settings.Name = "sSRQEndDate";
                                                                                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(90);
                                                                               }).GetHtml()

                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
           
                 <td align="right" style="text-align:right">
                调整人员：
            </td>
            <td>
                                   @Html.DevExpress().ComboBox(settings =>
                              {
                                  settings.Name = "FEmpName";
                                  settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                                  settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
                                  settings.Properties.TextField = "FEmpName";
                                  settings.Properties.ValueField = "FAdjustEmpNo";
                              }).BindList(ViewBag.FEmpNames).Bind(ViewBag.FEmpName).GetHtml()

            </td>

        </tr>
        <tr>
            <td colspan="5">
                <table>
                    <tr>
                    
         

                    </tr>
                </table>
            </td>
        </tr>
    </table>
    @Html.Partial("QueryTaxAuditAdjustListPartial", Model)

          @Html.Hidden("hfTaxClassAllowanceName", "");
					   @Html.Hidden("hfEmpName", "");
					    @Html.Hidden("hnsrsbh", "");
						 @Html.Hidden("hnsrbm", "");
						  @Html.Hidden("hnsrmc", "");
                               @Html.Hidden("hrKRQBeginDate", "");
					   @Html.Hidden("hrKRQEndDate ", "");
					    @Html.Hidden("hssRQBeginDate", "");
						 @Html.Hidden("hssRQEndDate", "");
                         @Html.Hidden("hsearched", "F")

    }
</body>
</html>
<script>
    lp.Hide();
</script>
